<%-- 
    Document   : edit
    Created on : 12.12.2013, 23:34:12
    Author     : palo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><spring:message code="mushroom.edit" /></title>
          
        <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/style.css" type="text/css" >   
    </head>
    <body>
        <div id="cele">
            <h1><span></span><c:out value="top.main" /></h1>       
            <jsp:include page="../menu.jsp" />
        
        <div id="obsah">      
                <form:form method="POST" modelAttribute="editedMushroom">
                    <fieldset>
                        <legend><spring:message code="mushroom.edit" /></legend>
                        <table>
                            <tr>
                                <td>
                                    <form:label for="name" path="name">
                                        <spring:message code="mushroom.name" />:
                                    </form:label> 
                                </td>
                                <td>
                                    <form:input path="name" />
                                </td>
                                <td>
                                    <form:errors for="name" path="name" cssClass="error" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <form:label for="growsFrom" path="growsFrom">
                                        <spring:message code="mushroom.growsFrom" />:
                                    </form:label> 
                                </td>
                                <td>

                                    <form:select path="growsFrom">       
                                        <form:option value="1">1</form:option>  
                                        <form:option value="2">2</form:option> 
                                        <form:option value="3">3</form:option>  
                                        <form:option value="4">4</form:option> 
                                        <form:option value="5">5</form:option>  
                                        <form:option value="6">6</form:option> 
                                        <form:option value="7">7</form:option>  
                                        <form:option value="8">8</form:option> 
                                        <form:option value="9">9</form:option>  
                                        <form:option value="10">10</form:option> 
                                        <form:option value="11">11</form:option>  
                                        <form:option value="12">12</form:option> 
                                    </form:select>
                                </td>
                                <td>
                                    <form:errors for="growsFrom" path="growsFrom" cssClass="error" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <form:label for="growsUntil" path="growsUntil">
                                        <spring:message code="mushroom.growsUntil" />:
                                    </form:label> 
                                </td>
                                <td>

                                    <form:select path="growsUntil">       
                                        <form:option value="1">1</form:option>  
                                        <form:option value="2">2</form:option> 
                                        <form:option value="3">3</form:option>  
                                        <form:option value="4">4</form:option> 
                                        <form:option value="5">5</form:option>  
                                        <form:option value="6">6</form:option> 
                                        <form:option value="7">7</form:option>  
                                        <form:option value="8">8</form:option> 
                                        <form:option value="9">9</form:option>  
                                        <form:option value="10">10</form:option> 
                                        <form:option value="11">11</form:option>  
                                        <form:option value="12">12</form:option> 
                                    </form:select>
                                </td>
                                <td>
                                    <form:errors for="growsUntil" path="growsUntil" cssClass="error" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <form:label for="type" path="type">
                                        <spring:message code="mushroom.type" />:
                                    </form:label> 
                                </td>
                                <td>
                                   <form:select path="type">  
                                    <form:option value="EDIBLE"><spring:message code="EDIBLE" /></form:option>  
                                        <form:option value="NOTEDIBLE"><spring:message code="NOTEDIBLE" /></form:option> 
                                        <form:option value="POISONOUS"><spring:message code="POISONOUS" /></form:option> 
                                   </form:select>
                                </td>
                                <td>
                                    <form:errors for="type" path="type" cssClass="error" />
                                </td>
                            </tr>
                        </table>
                        <button><spring:message code="mushroom.edit" /></button>
                    </fieldset>
                </form:form>
            <p>
                <a href="${pageContext.request.contextPath}/mushroom"><spring:message code="mushroom.all" /></a>
            </p>        
            </div>
             
                <jsp:include page="../footer.jsp" />
            

    </body>
</html>


